home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
amiga
/
MathIEEESingBas.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
3KB
|
134 lines
(**************************************************************************
$RCSfile: MathIEEESingBas.mod $
Description: Interface to mathieeesingbas.library
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:13:14 $
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994-1995, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE [2] MathIEEESingBas;
IMPORT SYS := SYSTEM, Kernel, x := Exec, m := MathLibrary;
CONST
pi * = 3.141592653589793;
twoPi * = 6.283185307179586; (* Pi * 2.0 *)
pi2 * = 1.570796326794696; (* Pi / 2.0 *)
pi4 * = 0.785398163397448; (* Pi / 4.0 *)
e * = 2.718281828459045;
log10 * = 2.302585092994046;
fpTen * = 10.0;
fpOne * = 1.0;
fpHalf * = 0.5;
fpZero * = 0.0;
(*
** $VER: mathieeesp.h 1.1 (13.7.90)
*)
(*-- MathIEEESingBas Base variable --------------------------------------*)
CONST
mathIEEESingBasName * = "mathieeesingbas.library";
VAR
base * : m.MathIEEEBasePtr;
(*-- Library Functions ------------------------------------------------*)
(*
** $VER: mathieeesingbas_protos.h 1.3 (7.11.90)
*)
PROCEDURE Fix* [base,-30]
( parm [0] : REAL )
: LONGINT;
PROCEDURE Flt* [base,-36]
( integer [0] : LONGINT )
: REAL;
PROCEDURE Cmp* [base,-42]
( leftParm [0] : REAL;
rightParm [1] : REAL )
: LONGINT;
PROCEDURE Tst* [base,-48]
( parm [0] : REAL )
: LONGINT;
PROCEDURE Abs* [base,-54]
( parm [0] : REAL )
: REAL;
PROCEDURE Neg* [base,-60]
( parm [0] : REAL )
: REAL;
PROCEDURE Add* [base,-66]
( leftParm [0] : REAL;
rightParm [1] : REAL )
: REAL;
PROCEDURE Sub* [base,-72]
( leftParm [0] : REAL;
rightParm [1] : REAL )
: REAL;
PROCEDURE Mul* [base,-78]
( leftParm [0] : REAL;
rightParm [1] : REAL )
: REAL;
PROCEDURE Div* [base,-84]
( dividend [0] : REAL;
divisor [1] : REAL )
: REAL;
PROCEDURE Floor* [base,-90]
( parm [0] : REAL )
: REAL;
PROCEDURE Ceil* [base,-96]
( parm [0] : REAL )
: REAL;
(*-- Library Base variable --------------------------------------------*)
<*$LongVars-*>
(*-----------------------------------*)
PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
BEGIN (* CloseLib *)
IF base # NIL THEN x.CloseLibrary (base) END;
END CloseLib;
BEGIN
base := SYS.VAL (m.MathIEEEBasePtr,
x.OpenLibrary (mathIEEESingBasName, x.libraryMinimum));
IF base = NIL THEN HALT (100) END;
Kernel.SetCleanup (CloseLib)
END MathIEEESingBas.